package com.hejia.alauda.entity;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.Column;

/**
 * 
 * 企业充值订单
 *
 *
 * Created by showone on 2015 上午10:15:24.
 *
 * @Copyright: 2015 www.hejiajinrong.com All rights reserved.
 */
public class B2BPayOrder extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public enum Status {
		STATUS_SUBMIT, STATUS_PROCESSING, STATUS_SUCCESS, STATUS_FAILURE;
	}

	@Column
	private String orderNumber;// 订单号

	@Column
	private String userId;// 用户Id

	@Column
	private BigDecimal amount;// 金额

	@Column
	private String bankcode;// 银行编码

	@Column
	private Status status;// 状态

	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getBankcode() {
		return bankcode;
	}

	public void setBankcode(String bankcode) {
		this.bankcode = bankcode;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

    public String getStatusText(){
        switch (getStatus()){
            case STATUS_SUBMIT:
                return "提交申请";
            case STATUS_PROCESSING:
                return "进行中";
            case STATUS_SUCCESS:
                return "打款成功";
            case STATUS_FAILURE:
                return "打款失败";
            default:
                break;
        }
        return "";
    }
    
    /**
     * 用户名称
     * @return
     */
    public String getUserName() {
    	Map<String, String> map = new HashMap<>();
    	map.put("hzhj", "杭州合家网络科技有限公司");
    	map.put("hzjg", "杭州久固酒店设备有限公司");
    	map.put("rhbl", "深圳瑞合保理有限公司");
    	return map.get(userId);
    }
}
